package com.firewolf.dubbo.mains;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.firewolf.s06.service.CallbackListener;
import com.firewolf.s06.service.CallbackService;

public class CallConsumer {
	@SuppressWarnings("resource")
	public static void main(String[] args) throws Exception {

		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] { "consumer.xml" });
		CallbackService callbackService = (CallbackService) ctx.getBean("callbackService");

		callbackService.addListener("http://10.20.160.198/wiki/display/dubbo/foo.bar", new CallbackListener() {
			public void changed(String msg) {
				System.out.println("callback1:" + msg);
			}
		});
	}
}
